package com.pro01.backend.mapper;

import com.pro01.backend.pojo.TrackerReport;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface TrackerReportMapper {

    @Select("""
        SELECT * FROM tracker_reports
        WHERE user_id = #{userId}
        ORDER BY created_at DESC
        LIMIT 1
    """)
    TrackerReport getLatestReportByUser(@Param("userId") Long userId);
}
